﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace KLADR
{
    public partial class FormEditAddress : Form
    {
        public FormEditAddress()
        {
            InitializeComponent();
            //enterKladr1.SqlConnectionString = Properties.Settings.Default.testlinqConnectionString;
        }

        public string SqlConnectionString { get { return enterKladr1.SqlConnectionString; } 
            set { 
                if (string.IsNullOrEmpty(value)) return; 
                enterKladr1.SqlConnectionString = value; } }

        public string DefaultKladrCode
        {
            get
            {
                return enterKladr1.KladrCode;
            }
            set
            {
                if (null == value) return;
                enterKladr1.KladrCode = value;
            }
        }

        public string KladrAddr
        {
            get
            {
                return enterKladr1.KladrAddr;
            }
            set
            {
                enterKladr1.KladrAddr = value;
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            
            
        }

        private void buttonSave_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.OK;
            Close();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.Cancel;
            Close();
        }
    }
}
